added fields to GSRSharedCodeSerializer#391
Conversation
There was a problem hiding this comment.
Pull request overview
Updates the public share-code booking serialization/tests to expose more booking/GSR detail when retrieving a shared booking.
Changes:
- Expand
SharedGSRBookingSerializerfields to includebooking_id,room_id, and a nestedgsrobject. - Update share-code view tests to assert the new response structure and fields.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
backend/tests/gsr_booking/test_share_codes.py |
Adjusts assertions for the shared-booking payload/serializer to match the expanded response shape. |
backend/gsr_booking/serializers.py |
Changes shared booking serializer output from building to nested gsr, and adds additional booking fields. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
08aca1f to
485166e
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| self.assertIn("is_valid", data) | ||
| self.assertIn("owner_name", data) | ||
|
|
||
| # Should not have owner info |
There was a problem hiding this comment.
The test asserts owner_name is included, but immediately after it says "Should not have owner info". Clarify the intent by adjusting the comment to reflect what is actually forbidden (e.g., exclude user/owner objects but allow owner_name), or remove owner_name from the expected output if it shouldn't be public.
| # Should not have owner info | |
| # Should not expose owner-related model fields (only owner_name is allowed) |
No description provided.